Current Location: Home> Function Categories> lcg_value

lcg_value

Combined linear congruent generator
Name:lcg_value
Category:math
Programming Language:php
One-line Description:Returns a pseudo-random number with a range of (0,1).

Definition and usage

lcg_value() combines linear congruent generators.

Example

 <?php
echo lcg_value ( ) ;
?>

Try it yourself

grammar

 lcg_value ( )

illustrate

lcg_value() returns a pseudo-random number with a range of (0, 1). This function combines two congruent generators with periods 2^31 - 85 and 2^31 - 249. The period of this function is equal to the product of these two prime numbers.

Similar Functions